Integrand size = 23, antiderivative size = 162 \[ \int \sqrt {a+a \sin (e+f x)} \tan ^4(e+f x) \, dx=\frac {11 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a+a \sin (e+f x)}}\right )}{8 \sqrt {2} f}-\frac {27 \sec (e+f x) \sqrt {a (1+\sin (e+f x))}}{8 f}-\frac {\sec ^3(e+f x) \sqrt {a (1+\sin (e+f x))}}{12 f}+\frac {29 \sqrt {a+a \sin (e+f x)} \tan (e+f x)}{12 f}+\frac {5 \sqrt {a (1+\sin (e+f x))} \tan ^3(e+f x)}{12 f} \]
11/16*arctanh(1/2*cos(f*x+e)*a^(1/2)*2^(1/2)/(a+a*sin(f*x+e))^(1/2))*a^(1/ 2)/f*2^(1/2)-27/8*sec(f*x+e)*(a*(1+sin(f*x+e)))^(1/2)/f-1/12*sec(f*x+e)^3* (a*(1+sin(f*x+e)))^(1/2)/f+29/12*(a+a*sin(f*x+e))^(1/2)*tan(f*x+e)/f+5/12* (a*(1+sin(f*x+e)))^(1/2)*tan(f*x+e)^3/f
Result contains complex when optimal does not.
Time = 5.59 (sec) , antiderivative size = 394, normalized size of antiderivative = 2.43 \[ \int \sqrt {a+a \sin (e+f x)} \tan ^4(e+f x) \, dx=\frac {\left (\frac {6 \sin \left (\frac {f x}{2}\right )}{\cos \left (\frac {e}{2}\right )+\sin \left (\frac {e}{2}\right )}-\frac {3 \left (\cos \left (\frac {e}{2}\right )-\sin \left (\frac {e}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )}{\cos \left (\frac {e}{2}\right )+\sin \left (\frac {e}{2}\right )}+(33+33 i) (-1)^{3/4} \text {arctanh}\left (\left (\frac {1}{2}+\frac {i}{2}\right ) (-1)^{3/4} \sec \left (\frac {f x}{4}\right ) \left (\cos \left (\frac {1}{4} (2 e+f x)\right )-\sin \left (\frac {1}{4} (2 e+f x)\right )\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^2-48 \cos \left (\frac {f x}{2}\right ) \left (\cos \left (\frac {e}{2}\right )-\sin \left (\frac {e}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^2+48 \left (\cos \left (\frac {e}{2}\right )+\sin \left (\frac {e}{2}\right )\right ) \sin \left (\frac {f x}{2}\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^2+\frac {4 \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^2}{\left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^3}-\frac {36 \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^2}{\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )}\right ) \sqrt {a (1+\sin (e+f x))}}{24 f \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^3} \]
(((6*Sin[(f*x)/2])/(Cos[e/2] + Sin[e/2]) - (3*(Cos[e/2] - Sin[e/2])*(Cos[( e + f*x)/2] + Sin[(e + f*x)/2]))/(Cos[e/2] + Sin[e/2]) + (33 + 33*I)*(-1)^ (3/4)*ArcTanh[(1/2 + I/2)*(-1)^(3/4)*Sec[(f*x)/4]*(Cos[(2*e + f*x)/4] - Si n[(2*e + f*x)/4])]*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^2 - 48*Cos[(f*x)/ 2]*(Cos[e/2] - Sin[e/2])*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^2 + 48*(Cos [e/2] + Sin[e/2])*Sin[(f*x)/2]*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^2 + ( 4*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^2)/(Cos[(e + f*x)/2] - Sin[(e + f* x)/2])^3 - (36*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^2)/(Cos[(e + f*x)/2] - Sin[(e + f*x)/2]))*Sqrt[a*(1 + Sin[e + f*x])])/(24*f*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^3)
Time = 1.23 (sec) , antiderivative size = 195, normalized size of antiderivative = 1.20, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3042, 3193, 3042, 3125, 4901, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \tan ^4(e+f x) \sqrt {a \sin (e+f x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \tan (e+f x)^4 \sqrt {a \sin (e+f x)+a}dx\) |
\(\Big \downarrow \) 3193 |
\(\displaystyle \int \sqrt {\sin (e+f x) a+a}dx-\int \sec ^4(e+f x) \sqrt {\sin (e+f x) a+a} \left (1-2 \sin ^2(e+f x)\right )dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sqrt {\sin (e+f x) a+a}dx-\int \frac {\sqrt {\sin (e+f x) a+a} \left (1-2 \sin (e+f x)^2\right )}{\cos (e+f x)^4}dx\) |
\(\Big \downarrow \) 3125 |
\(\displaystyle -\int \frac {\sqrt {\sin (e+f x) a+a} \left (1-2 \sin (e+f x)^2\right )}{\cos (e+f x)^4}dx-\frac {2 a \cos (e+f x)}{f \sqrt {a \sin (e+f x)+a}}\) |
\(\Big \downarrow \) 4901 |
\(\displaystyle -\int \left (\sec ^4(e+f x) \sqrt {a (\sin (e+f x)+1)}-2 \sec ^2(e+f x) \sqrt {a (\sin (e+f x)+1)} \tan ^2(e+f x)\right )dx-\frac {2 a \cos (e+f x)}{f \sqrt {a \sin (e+f x)+a}}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {11 a^2 \cos (e+f x)}{8 f (a \sin (e+f x)+a)^{3/2}}+\frac {11 \sqrt {a} \text {arctanh}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a}}\right )}{8 \sqrt {2} f}-\frac {2 a \cos (e+f x)}{f \sqrt {a \sin (e+f x)+a}}+\frac {4 \sec ^3(e+f x) (a \sin (e+f x)+a)^{3/2}}{3 a f}-\frac {7 \sec ^3(e+f x) \sqrt {a \sin (e+f x)+a}}{3 f}-\frac {11 a \sec (e+f x)}{6 f \sqrt {a \sin (e+f x)+a}}\) |
(11*Sqrt[a]*ArcTanh[(Sqrt[a]*Cos[e + f*x])/(Sqrt[2]*Sqrt[a + a*Sin[e + f*x ]])])/(8*Sqrt[2]*f) + (11*a^2*Cos[e + f*x])/(8*f*(a + a*Sin[e + f*x])^(3/2 )) - (2*a*Cos[e + f*x])/(f*Sqrt[a + a*Sin[e + f*x]]) - (11*a*Sec[e + f*x]) /(6*f*Sqrt[a + a*Sin[e + f*x]]) - (7*Sec[e + f*x]^3*Sqrt[a + a*Sin[e + f*x ]])/(3*f) + (4*Sec[e + f*x]^3*(a + a*Sin[e + f*x])^(3/2))/(3*a*f)
3.1.91.3.1 Defintions of rubi rules used
Int[Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[-2*b*(Cos [c + d*x]/(d*Sqrt[a + b*Sin[c + d*x]])), x] /; FreeQ[{a, b, c, d}, x] && Eq Q[a^2 - b^2, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*tan[(e_.) + (f_.)*(x_)]^4, x_Symbol] :> Int[(a + b*Sin[e + f*x])^m, x] - Int[(a + b*Sin[e + f*x])^m*(( 1 - 2*Sin[e + f*x]^2)/Cos[e + f*x]^4), x] /; FreeQ[{a, b, e, f, m}, x] && E qQ[a^2 - b^2, 0] && IntegerQ[m - 1/2]
Int[u_, x_Symbol] :> With[{v = ExpandTrig[u, x]}, Int[v, x] /; SumQ[v]] /; !InertTrigFreeQ[u]
Time = 0.83 (sec) , antiderivative size = 176, normalized size of antiderivative = 1.09
method | result | size |
default | \(-\frac {96 a^{\frac {5}{2}} \left (\cos ^{2}\left (f x +e \right )\right ) \sin \left (f x +e \right )+33 \left (a -a \sin \left (f x +e \right )\right )^{\frac {3}{2}} \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) \sin \left (f x +e \right ) a -162 a^{\frac {5}{2}} \left (\cos ^{2}\left (f x +e \right )\right )+33 \left (a -a \sin \left (f x +e \right )\right )^{\frac {3}{2}} \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a +20 a^{\frac {5}{2}} \sin \left (f x +e \right )-4 a^{\frac {5}{2}}}{48 a^{\frac {3}{2}} \left (\sin \left (f x +e \right )-1\right ) \cos \left (f x +e \right ) \sqrt {a +a \sin \left (f x +e \right )}\, f}\) | \(176\) |
-1/48/a^(3/2)*(96*a^(5/2)*cos(f*x+e)^2*sin(f*x+e)+33*(a-a*sin(f*x+e))^(3/2 )*2^(1/2)*arctanh(1/2*(a-a*sin(f*x+e))^(1/2)*2^(1/2)/a^(1/2))*sin(f*x+e)*a -162*a^(5/2)*cos(f*x+e)^2+33*(a-a*sin(f*x+e))^(3/2)*2^(1/2)*arctanh(1/2*(a -a*sin(f*x+e))^(1/2)*2^(1/2)/a^(1/2))*a+20*a^(5/2)*sin(f*x+e)-4*a^(5/2))/( sin(f*x+e)-1)/cos(f*x+e)/(a+a*sin(f*x+e))^(1/2)/f
Time = 0.34 (sec) , antiderivative size = 200, normalized size of antiderivative = 1.23 \[ \int \sqrt {a+a \sin (e+f x)} \tan ^4(e+f x) \, dx=\frac {33 \, \sqrt {2} \sqrt {a} \cos \left (f x + e\right )^{3} \log \left (-\frac {a \cos \left (f x + e\right )^{2} + 2 \, \sqrt {a \sin \left (f x + e\right ) + a} {\left (\sqrt {2} \cos \left (f x + e\right ) - \sqrt {2} \sin \left (f x + e\right ) + \sqrt {2}\right )} \sqrt {a} + 3 \, a \cos \left (f x + e\right ) - {\left (a \cos \left (f x + e\right ) - 2 \, a\right )} \sin \left (f x + e\right ) + 2 \, a}{\cos \left (f x + e\right )^{2} - {\left (\cos \left (f x + e\right ) + 2\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 2}\right ) - 4 \, {\left (81 \, \cos \left (f x + e\right )^{2} - 2 \, {\left (24 \, \cos \left (f x + e\right )^{2} + 5\right )} \sin \left (f x + e\right ) + 2\right )} \sqrt {a \sin \left (f x + e\right ) + a}}{96 \, f \cos \left (f x + e\right )^{3}} \]
1/96*(33*sqrt(2)*sqrt(a)*cos(f*x + e)^3*log(-(a*cos(f*x + e)^2 + 2*sqrt(a* sin(f*x + e) + a)*(sqrt(2)*cos(f*x + e) - sqrt(2)*sin(f*x + e) + sqrt(2))* sqrt(a) + 3*a*cos(f*x + e) - (a*cos(f*x + e) - 2*a)*sin(f*x + e) + 2*a)/(c os(f*x + e)^2 - (cos(f*x + e) + 2)*sin(f*x + e) - cos(f*x + e) - 2)) - 4*( 81*cos(f*x + e)^2 - 2*(24*cos(f*x + e)^2 + 5)*sin(f*x + e) + 2)*sqrt(a*sin (f*x + e) + a))/(f*cos(f*x + e)^3)
\[ \int \sqrt {a+a \sin (e+f x)} \tan ^4(e+f x) \, dx=\int \sqrt {a \left (\sin {\left (e + f x \right )} + 1\right )} \tan ^{4}{\left (e + f x \right )}\, dx \]
\[ \int \sqrt {a+a \sin (e+f x)} \tan ^4(e+f x) \, dx=\int { \sqrt {a \sin \left (f x + e\right ) + a} \tan \left (f x + e\right )^{4} \,d x } \]
Exception generated. \[ \int \sqrt {a+a \sin (e+f x)} \tan ^4(e+f x) \, dx=\text {Exception raised: TypeError} \]
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Not invertible Error: Bad Argument Value
Timed out. \[ \int \sqrt {a+a \sin (e+f x)} \tan ^4(e+f x) \, dx=\int {\mathrm {tan}\left (e+f\,x\right )}^4\,\sqrt {a+a\,\sin \left (e+f\,x\right )} \,d x \]